package xin.mashibo.wanjiobutest.vo;

import android.os.Parcel;
import android.os.Parcelable;

import com.wanji.etcble.bean.DeviceInformation;

/**
 * @author MaShibo
 *         on 2018/3/21
 */
public class DeviceInfo extends DeviceInformation implements Parcelable {

    public DeviceInfo() {
    }

    protected DeviceInfo(Parcel in) {
        ErrorCode = in.readInt();
        DevName = in.readString();
        DevAddress = in.readString();
        VerId = in.readString();
        Version = in.readString();
        Battery = in.readString();
        Sn = in.readString();
    }

    public static final Creator<DeviceInfo> CREATOR = new Creator<DeviceInfo>() {
        @Override
        public DeviceInfo createFromParcel(Parcel in) {
            return new DeviceInfo(in);
        }

        @Override
        public DeviceInfo[] newArray(int size) {
            return new DeviceInfo[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(ErrorCode);
        dest.writeString(DevName);
        dest.writeString(DevAddress);
        dest.writeString(VerId);
        dest.writeString(Version);
        dest.writeString(Battery);
        dest.writeString(Sn);
    }
}
